package dev.tools;

public class TextToNumberConverter {

    public static int toInt(String string) {
        char[] charArray = string.toCharArray();
        
        int mask = 1;
        int result = 0;
        
        for (char character : charArray) {
            int holder = mask * character;
            mask++;
            result += holder;
        }
        
        return result;
    }
    
}
